
Turieg_DEBUG = 1;
Turieg_TextChangeIgnore=false;
TuriegInvResult = {};


function TuriegInvBank_OnLoad()
--  this:RegisterForDrag("LeftButton");
--  this:RegisterEvent("ADDON_LOADED");
--  this:RegisterEvent("VARIABLES_LOADED");
  
  TuriegInvBankReply:SetMaxLetters(12);
end

function TuriegInvBank_ScrollTGEntries()
  local line;
  local lineplusoffset;
  local framescrollsize;
  TGDebug(" many ");

  if (#TuriegInvResult < 16) then
     framescrollsize = 16;
  else
     framescrollsize = #TuriegInvResult;
  end;
  FauxScrollFrame_Update(TuriegInvBankTGEntries,framescrollsize,15,16);
  for line=1,15 do
    lineplusoffset = line + FauxScrollFrame_GetOffset(TuriegInvBankTGEntries);
    if lineplusoffset < #TuriegInvResult+1 then
      getglobal("TGEntry"..line):SetText(TuriegInvResult[lineplusoffset]);
      getglobal("TGEntry"..line):SetID(lineplusoffset);
      getglobal("TGEntry"..line):Show();
    else
      getglobal("TGEntry"..line):Hide();
    end
  end
  TGDebug(" Done many ");
end


function TGDebug(str)
  if (Turieg_DEBUG > 0) then
     DEFAULT_CHAT_FRAME:AddMessage(str);
  end
end


function TuriegInvBank_Show()
    TuriegInvBankFrame:Show();
end

function TuriegInvBank_OnDragStart()
      TuriegInvBankFrame:StartMoving();
end

function TuriegInvBank_OnDragStop()
    TuriegInvBankFrame:StopMovingOrSizing()
end

function TuriegInvBank_Hide() 
    TuriegInvBankFrame:Hide();
end

